<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>p11style内联样式</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.js"></script>
</head>
<body>
    <div id="app">
        <h1 :style="[styleobj,styleobj2]">这是一个h1</h1>
        <h1 :style="styleobj2">这是一个h1</h1>
    </div>
    <script>
    var vm=new Vue({
        el:"#app",
        data:{
            styleobj:{'color':'red','font-weight':200},
            styleobj2:{
                'font-style':"italic"
            }
        },
        methods:{}
    })
    </script>
</body>
</html>